﻿@model web.Models.SearchBy
@using Resources

<script type="text/javascript">
    function loadMap() {
        $.ajax({
            url: './SearchBy/GetEventLocations',
            success: function (locations) {
                citytour.map.setLocations(locations, false);
            }
        });
    }

</script>

@*<link href="@Url.Content("~/Content/SearchBy.css")" rel="stylesheet" type="text/css"></link>*@
<div class="item_list right">
    <h2>@TextStrings.SearchBy</h2>
    <div class="Search">
        @*@using(Html.BeginForm("Search", "SearchBy"))
         {
         }*@
            
           <form method="POST" action="@Url.Action("Index","SearchBy")">
            <!-- <label for="searchByName" class="select">Rubro:</label>-->
            <div class="search-by"><span>@Html.Label(TextStrings.CommerceName):</span> @Html.TextBox("comecommerceName")</div>
             <div class="search-by"><span>@Html.Label(TextStrings.Description):</span> @Html.TextBox("commerceDescription")</div>
             <div class="search-by"><span>@Html.Label(TextStrings.CommerceCategory):</span> 
	             <select name="commerceCategoryID" id="commerceCategory" >
                        <option value="-1">Todos</option>
                        @if (Model != null)
                        {
                            var business = Model.DataBaseCommerce.Select(aCommerce => aCommerce.Company.Business).Distinct();
                            foreach (var aBusiness in business)
                            {
                                    <option value= @aBusiness.ID.ToString()>@aBusiness.Name</option>
                            }
                        }
                </select>
            </div>
            <input type="submit" value="Search" />
           </form>
        @*}*@
    </div>
</div>
<div class="map"></div>
